package com.blackcat.springbootcloud.feign;

import com.blackcat.springbootcloud.feign.fallback.ConsumerServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;

/**
  * <p> 描述 :
  * @author : blackcat
  * @date  : 2020/8/28 16:14
 *
 *  ${remote.server} 为配置文件中的配置
 *  server：为提供者服务名称,如：provider-dev.yaml
 */
@FeignClient(value = "${remote.server}",fallback = ConsumerServiceFallback.class)
public interface ConsumerService {

    /**
     * <p> 描述 :
     * @author : blackcat
     * @date  : 2020/8/28 16:16
     *
     * /provider/test 为提供者示例的方法链接
    */
    @RequestMapping("/provider/test")
    String test();
}
